﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="Home.ascx.cs" Inherits="Components_Home" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<telerik:RadScriptManager ID="ScriptManager2" runat="server" EnableTheming="True"></telerik:RadScriptManager>
<asp:UpdatePanel ID="UpdatePanelHome" runat="server">
<ContentTemplate>
<div class="leftCol">
<div id="div_New" runat="server">
<div class="greenTitle"><a href="/san-pham-moi">Sản phẩm mới</a></div>
<div class="four">
    <!-- ListView -->
    <asp:ListView ID="lvProductNew"  runat="server" >
        <LayoutTemplate>
           <div  id="div_listNew" runat="server"><asp:PlaceHolder ID="itemPlaceholder" runat="server" /></div>      
        </LayoutTemplate>
        <ItemTemplate>
           <div class="greenBg">
                <div class="info">
                    <center>
                         <b><%#Eval("ProductName")%></b><br />
                        <a href='<%#Utils.RemoveUnicode(Eval("Link").ToString())%>'>
                            <img src="<%# Utils.getUrlImage() + Eval("ImagePath")%>" class="pic" alt='<%#Eval("ProductName")%>' />        
                        </a>
                        <br />
                        <b class="price"><%# String.Format("{0:N0}",Eval("Price"))%> vnđ/kg</b>

                        <asp:Button runat="server"  class="greenBtnSmall" ID="btnOrder" Text="Đặt hàng"
                            CommandArgument='<%#Eval("ProductID") + "@" + Eval("ProductName") + "@" +Eval("ProductCode")+"@"+ Eval("ImagePath") +"@"+ Eval("Price") +"@"+ Eval("IsPromotion") %>'  OnCommand="btnOrder_Command"/>
                    </center>
                </div><!--info----->
            </div>
        </ItemTemplate>
    </asp:ListView>
    <!-- End ListView -->
                    
<div class="clearBoth"></div>
<div class="greenLink" id="div_New_All" runat="server"><a href="/san-pham-moi" style="text-decoration:none;font-style:italic;"><span style="text-decoration:underline;">Còn nữa</span>  <img src="../Template/Images/arrow.gif" width="17"/></a></div>
<div class="clearBoth"></div>
                    
</div><!--four--->
</div>

<div id ="div_Liked" runat="server">  
<div class="redTitle"><a href="/san-pham-ua-chuong">Sản phẩm ưa chuộng</a></div>            
<div class="four">
    <!-- ListView -->
    <asp:ListView ID="lvLiked"  runat="server" >
        <LayoutTemplate>
           <div  id="div_listLiked" runat="server"><asp:PlaceHolder ID="itemPlaceholder" runat="server" /></div>      
        </LayoutTemplate>
        <ItemTemplate>
            <div class="greenBg">
                <div class="info">
                    <center>
                        <b>
                        <%#Eval("ProductName")%>
                        </b>
                        </span>
                        <br />
                        <a href='<%#Utils.RemoveUnicode(Eval("Link").ToString())%>'>
                            <img src="<%# Utils.getUrlImage() + Eval("ImagePath")%>" class="pic" alt='<%#Eval("ProductName")%>' />        
                        </a>
                        <br />
                        <b class="price"><%# String.Format("{0:N0}",Eval("Price"))%> vnđ/kg</b>
                        <asp:Button runat="server"  class="redBtn" ID="btnOrderLiked" Text="Đặt hàng"
                            CommandArgument='<%#Eval("ProductID") + "@" + Eval("ProductName") + "@" +Eval("ProductCode")+"@"+ Eval("ImagePath") +"@"+ Eval("Price") + "@"+ Eval("IsPromotion") %>'  OnCommand="btnOrderLiked_Command"/>
                        <!--<input type="btnOrder" class="greenBtn" value="đặt mua" /> -->
                    </center>
                </div><!--info----->
            </div>
        </ItemTemplate>
    </asp:ListView>
    <!-- End ListView -->           
    <div class="clearBoth"></div>
    <div class="redLink" id="div_Liked_All" runat="server"><a href="/san-pham-ua-chuong" style="text-decoration:none;font-style:italic;"><span style="text-decoration:underline;">Còn nữa</span>  <img src="../Template/Images/arrow.gif" width="17"/></a></div>
    <div class="clearBoth"></div>
                    
</div><!---four----->
</div>                             
</div><!---leftCol---->
</ContentTemplate>
</asp:UpdatePanel>
<div class="progressbar">
    <asp:UpdateProgress ID="up" runat="server" AssociatedUpdatePanelID="UpdatePanelHome">
        <ProgressTemplate>
            <div class="bg">
                <div class="progress progress-striped active">
                    <div class="progress-bar" role="progressbar" aria-valuenow="45" aria-valuemin="0"
                        aria-valuemax="100" style="width: 100%">
                        <span class="sr-only">100% Complete</span>
                    </div>
                </div>
            </div>
        </ProgressTemplate>
    </asp:UpdateProgress>
</div>